function dAlert(txt)
{
 if (CW2_DEBUG)
 {
  alert(txt);
 }
}

function addInput(form, name, value)
{
 input = document.createElement('input');
 input.type = "HIDDEN";
 input.name = name;
 input.value = value;
 form.appendChild(input);
}

function doObjPosition(obj)
{
   left = obj.style.left.replace("px","");
   top = obj.style.top.replace("px","");
   obj.style.display = '';
   obj.style.left = parseInt(obj.style.left.replace("px","")) - Math.round(obj.offsetWidth/2);
			obj.style.top = parseInt(obj.style.top.replace("px","")) - Math.round(obj.offsetHeight/2);
}

function doPosition()
{
	coll = document.all["icon"];
	if (coll != null)
	{
		for (i=0; i<coll.length; i++)
		{
			doObjPosition(coll.item(i));
		}
	}
}
